package com.meilai.project.service.business.intentionScheme;

import com.meilai.project.controller.web.market.vo.BillMarketDetailVO;
import com.meilai.project.dto.business.intentionScheme.*;
import com.meilai.project.entity.business.combo.GasStationCombo;
import com.meilai.project.entity.media.MediaPointChooseDaterangeMediapoint;
import com.meilai.project.vo.business.intentionScheme.ComboVO;
import com.meilai.project.vo.business.intentionScheme.PointProcessDateRangeVO;
import com.meilai.project.vo.business.sale.BillSaleVO;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * @author xchen
 * @since 2022-03-05
 */
public interface PointProcessService {

	void copyWorkOrder(Long newSaleId, Long oldWorkOrderId);

	//中间监播工单
	Long newMonitorWorkOrder(BillSaleVO saleVO, List<Long> buildAreaIdList, LocalDate deadLine, List<Long> shootRequirementIdList);

	Long newUpWorkOrder(BillSaleVO saleVO, List<Long> buildAreaIdList);

	Long newDownWorkOrder(BillSaleVO saleVO, List<Long> buildAreaIdList);

	Long newReplaceWorkOrder(BillSaleVO saleVO, List<Long> buildAreaIdList);

	List<MediaPointChooseDaterangeMediapoint> listByChooseId(Long chooseId);

	List<ComboVO> getComboCountList();

	Map<Long,String> getRuleNameMap();

	Map<Long, GasStationCombo> getComboMap();

	List<BuildingPointVO> search(PointProcessSearchDTO searchDTO);

	int releaseLock(Long choose_id);

	int releaseLockAndBackUp(List<Long> chooseIdList);

	int rollback(List<Long> chooseIdList);

	Long getSaleChooseId(Long saleId);

	void hangUpByChooseIds(List<Long> chooseIdList);

	void cancelHangUpByChooseIds(List<Long> chooseIdList);

	void invalidByChooseIds(List<Long> chooseIdList);

	void invalidIntentionScheme(Long contractId);

	Long saveChoose(Integer chooseType, Long choose_id, List<PointProcessDateRangeDTO> dataList);

	/**
	 * 返回new_choose_id
	 */
	Long copyChooseAndTransferLockPoint(Integer newChooseType, List<Long> oldChooseIdList);

	/**
	 * 返回值0:newChooseId,返回值1:newDateRangeId
	 */
	Long[] copyChooseAndTransferLockPoint(Integer newChooseType, Long oldChooseId, Long oldDateRangeId);

	int lock(Long choose_id);

	List<PointProcessDateRangeVO> queryChooseDateRangeVOList(Long choose_id);

	List<PointProcessDateRangeVO> queryChooseDateRangeVOList(Long choose_id,Long dateRangeId);

	PointProcessDateRangeLockedDTO checkRangeDateLockedPointList(List<PointProcessDateRangeDTO> dataList);

	PointProcessLockedMediaPointDTO checkOccupyMediaPointList(
			Long chooseId, List<PointProcessDateRangeDTO> dataList);

	PointProcessLockedMediaPointDTO checkOccupyMediaPointList(
			List<Long> chooseIdList, List<PointProcessDateRangeDTO> dataList);

    List<BuildingPointVO> searchAll(PointProcessSearchDTO searchDTO);

	//================================================

	Long newUpWorkOrder(BillMarketDetailVO saleVO, List<Long> buildAreaIdList);

	Long newDownWorkOrder(BillMarketDetailVO saleVO, List<Long> buildAreaIdList);

	Long newReplaceWorkOrder(BillMarketDetailVO saleVO, List<Long> buildAreaIdList);
}
